package com.jsj.service.impl;

import com.jsj.mapper.LaboratoryMapper;
import com.jsj.pojo.Laboratory;
import com.jsj.service.LaboratoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LaboratoryServiceImpl implements LaboratoryService {

    @Autowired
    LaboratoryMapper laboratoryMapper;

    @Override
    public List<Laboratory> queryAllLaboratory() {
        List<Laboratory> laboratoryList = laboratoryMapper.queryAllLaboratory();
        return laboratoryList;

    }

    @Override
    public List<Laboratory> queryLaboratory(String laboratory) {

        List<Laboratory> laboratoryList = laboratoryMapper.queryLaboratory(laboratory);
        return laboratoryList;
    }

    @Override
    public Boolean updateByLabId(Laboratory laboratory) {

        Boolean aBoolean = laboratoryMapper.updateByLabId(laboratory);
        return aBoolean;
    }

    @Override
    public Boolean delLabById(int labId) {

        Boolean aBoolean = laboratoryMapper.delLabById(labId);
        return aBoolean;
    }

    @Override
    public Boolean addLaboratory(Laboratory laboratory) {

        Boolean aBoolean = laboratoryMapper.addLaboratory(laboratory);
        return aBoolean;
    }



}
